﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Design_Pattners.Composite;
using System.Collections;

namespace Module_Basic_Entities
{
    public abstract class MapComponent : IComponent
    {

        public virtual int NumChildLayers { get; set; }

        public abstract void Init();

        #region IComponent Members

        public virtual void Add<T>(T c) where T : IComponent
        {
            if (c is Layer)
                this.NumChildLayers++;
        }

        public virtual void Remove<T>(T c) where T : IComponent
        {
            if (c is Layer)
                this.NumChildLayers--;
        }

        public abstract void Draw(float gameTime);

        #endregion
    }
}
